package com.bsj.pay.service.impl;

import java.util.List;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import com.bsj.pay.dao.AreaDao;
import com.bsj.pay.model.AreaBean;
import com.bsj.pay.service.AreaService;
import com.github.pagehelper.PageHelper;
import com.github.pagehelper.PageInfo;

@Service
public class AreaServiceImpl implements AreaService{
	
	@Autowired
	private AreaDao dao;

	@Override
	public long insert(AreaBean t) {
		// TODO Auto-generated method stub
		return dao.insert(t);
	}

	@Override
	public int deleteById(Long id) {
		// TODO Auto-generated method stub
		return dao.deleteById(id);
	}

	@Override
	public List<AreaBean> queryList(AreaBean t) {
		// TODO Auto-generated method stub
		return dao.queryList(t);
	}

	@Override
	public int update(AreaBean t) {
		// TODO Auto-generated method stub
		return dao.update(t);
	}

	@Override
	public AreaBean getById(Long Id) {
		// TODO Auto-generated method stub
		return dao.getById(Id);
	}

	@Override
	public long count(AreaBean t) {
		// TODO Auto-generated method stub
		return dao.count(t);
	}

	@Override
	public PageInfo<AreaBean> pageList(AreaBean t, int pageNum, int pageSize) {
		// TODO Auto-generated method stub
		PageHelper.startPage(pageNum, pageSize);
		List<AreaBean> list = dao.queryList(t);
		PageInfo<AreaBean> pageInfo= new PageInfo<AreaBean>(list);
		return pageInfo;
	}

	@Override
	public int removeById(Long id) {
		// TODO Auto-generated method stub
		return 0;
	}

	@Override
	public List<AreaBean> queryAll() {
		// TODO Auto-generated method stub
		return null;
	}

}
